<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>EVON Global Logistics Solution - Create Vendor</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/functionality.js"></script>
<script type="text/javascript">
	document.getElementById("hiddebButtonCountry").style.display="none";
</script>
</head>

<body onload="hideall()">	
	
	<sj:div id="createVendorDiv"  indicator="indicator">
	<!--<div class="headingbginner">Create OEM</div>-->
	
	<s:actionmessage/>
	<s:actionerror/>
	<s:fielderror/>
	<s:form id="createVendorForm" action="addVendor" theme="simple" validate="true">
		
		<s:hidden name="dto.id" id="dto.id" value="%{dto.id}"></s:hidden>
		
		<table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="gridtable">
		<tr>
		<th colspan="4">Edit Details</th>
		</tr>
		<tr>
		<td width="15%">Name</td>
		<td width="35%"><s:textfield name="dto.name" label="Name :" value="%{dto.name}" maxlength="50"/></td>
		<td width="15%">City</td>
		<td width="35%"><s:textfield name="dto.city" label="City :" value="%{dto.city}" maxlength="30"/></td>
		</tr>
		<tr class="alt"> 
		<td>Phone</td>
		<td><s:textfield name="dto.phone" label="Phone :" value="%{dto.phone}" maxlength="13" /></td>
		<td>Address</td>
		<td><s:textarea name="dto.address" label="Address :"
		value="%{dto.address}" /></td>
		</tr>
		
		<tr class="alt">
		<td>Country</td>
		<td>
			<s:select headerKey="-1"
					headerValue="Select Country" list="listCountry" listKey="id"
					listValue="countryName" name="selectedCountryId" onchange="$.publish('countrySelectedTopic')"  />
					
			<sj:div id = "hiddebButtonCountry" >
				<sj:submit  formIds="createVendorForm"  href = "showStateForVendor.action" listenTopics="countrySelectedTopic" targets="createVendorDiv"></sj:submit>
			</sj:div>
		</td>
		 
		<td>State</td>
		<td>
		
		<s:select headerKey="-1"
					headerValue="Select State" list="listState" listKey="id"
					listValue="stateName" name="dto.state.id" />
				
		</td>
		
		</tr>
		
		
		<tr class="alt"> 
		<td>Zip</td>
		<td><s:textfield name="dto.zipCode" label="Zip :" value="%{dto.zipCode}" maxlength="10"/></td>
		<td>Email Id</td>
		<td>
		<!--<s:fielderror><s:param>dto.email</s:param></s:fielderror> -->
		<s:textfield name="dto.email" label="Email :"
		value="%{dto.email}" maxlength="30"/></td>
		</tr>
		
		<tr class="alt"> 
		<td>Status</td>
		<td>
			<s:checkbox id="isActive" name="dto.active"
				label="Active" value="%{dto.active}" ></s:checkbox>
		</td>
		</tr>
		<tr>
		
		
		</tr>
		</table>
		<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
		<td style="height:10px;"></td>
		</tr>
		
		<tr>
		<td width = "80%"></td>
		<td align="right"><sj:submit name = "Cancel" href = "vendorManagementBackAction.action" formIds="createVendorForm" targets="createVendorDiv" indicator="indicator" value="Back" cssClass="btnbg"/></td>
		
		
		<td align="right"><sj:submit formIds="createVendorForm" targets="createVendorDiv" indicator="indicator" value="Submit" cssClass="btnbg"/></td>
		</tr>
		
		
		</table>
	</s:form>	
	</sj:div>
</body>
</html>
